#ifndef STOCKVIEWWIDGET_H
#define STOCKVIEWWIDGET_H

#include <QWidget>
#include <QSqlQueryModel>
namespace Ui {
class StockViewWidget;
}

class StockViewWidget : public QWidget
{
    Q_OBJECT

public:
    explicit StockViewWidget(QWidget *parent = nullptr);
    ~StockViewWidget();

private:
    Ui::StockViewWidget *ui;
    QSqlQueryModel *model;
    //加载库存
    void loadStockData();
    //设置表格
    void setupTable();
private slots:
    //刷新
    void onRefresh();

};

#endif // STOCKVIEWWIDGET_H
